import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    maptype: 3,
    btntype:2,
    famendata: [],
    guanxiandata: [],
    xzqhlayerdata: [],

    
    mapstatus: true,
    mapshow: true,
    mapinit: true,

    toolbarshowhide: true,
    getdata: false,
    manyoudata: [],
    token:null
  },
  getters: {
    maptype: (state) => {
      return state.maptype;
    },
    btntype: (state) => {
      return state.btntype;
    },
    famendata: (state) => {
      return state.famendata;
    },
    guanxiandata: (state) => {
      return state.guanxiandata;
    },
    xzqhlayerdata: (state) => {
      return state.xzqhlayerdata;
    },

    mapstatus: (state) => {
      return state.mapstatus;
    },
    mapshow: (state) => {
      return state.mapshow;
    },
    mapinit: (state) => {
      return state.mapinit;
    },
    toolbarshowhide: (state) => {
      return state.toolbarshowhide;
    },
    getdata: (state) => {
      return state.getdata;
    },
    manyoudata: (state) => {
      return state.manyoudata;
    },
    token: (state) => {
      return state.token;
    },
  },
  mutations: {
    changeMaptype(state, payload) {
      state.maptype = payload;
    },
    changeBtntype(state, payload) {
      state.btntype = payload;
    },
    changefamendata(state, payload) {
      state.famendata = payload;
    },
    changeguanxiandata: (state, payload) => {
      state.guanxiandata = payload;
    },
    changexzqhlayerdata: (state, payload) => {
      state.xzqhlayerdata = payload;
    },
    changemapstatus: (state, payload) => {
      state.mapstatus = payload;
    },
    changemapshow: (state, payload) => {
      state.mapshow = payload;
    },
    changemapinit: (state, payload) => {
      state.mapinit = payload;
    },
    changetoolbarshowhide: (state, payload) => {
      state.toolbarshowhide = payload;
    },
    changegetdata: (state, payload) => {
      state.getdata = payload;
    },
    changemanyoudata: (state, payload) => {
      state.manyoudata = payload;
    },
    changetoken: (state, payload) => {
      state.token = payload;
    },
  },
  actions: {},
  modules: {},
});
